package com.mingke.java.utils;

import com.mingke.java.entity.AuthEntity;
import com.mingke.java.entity.JDBCInfoEntity;
import com.mingke.java.task.AuthOperationTask;

import java.util.UUID;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @author mingke
 * @desc do
 * @time 2023/6/17
 */
public class TestMain {

    private static ThreadPoolExecutor executor  = new ThreadPoolExecutor(10, 12, 60L, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(16));


    public static void main(String[] args) {
        JDBCInfoEntity jdbcInfoEntity = new JDBCInfoEntity("jdbc:mysql://192.168.5.54:3306/zzuli", "root", "123456", "sys_auth");
        AuthOperationTask task = new AuthOperationTask(jdbcInfoEntity);



        AuthEntity authEntity = task.get();
        if(authEntity != null && authEntity.getAuth_state()==1) {
            System.out.println(authEntity.toString());
        }else {
            System.out.println("验证失败");
        }
    }
}
